require 'redmine'

# Patches to the Redmine core
require 'dispatcher'

Dispatcher.to_prepare do
  require 'members_controller_hook'
  MembersController.send(:include, MembersControllerHookExportHtpasswd)
end

Redmine::Plugin.register :redmine_export_htpasswd do
  name 'Redmine Export htpasswd Plugin'
  author 'Tsubo'
  description 'This plugin export htpasswd format file witch can use in apache.'
  url 'http://code.google.com/p/tsubo-redmine-plugins/'
  author_url 'http://code.google.com/p/tsubo-redmine-plugins/'

  settings :default => {
    'export_path' => {}
  }, :partial => 'settings/export_htpasswd_settings'

  version '0.0.2'
  requires_redmine :version_or_higher => '0.9.0'
end
